<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: pcl::Kmeans类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpcl_1_1_kmeans.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pro-attribs">Protected 属性</a> &#124;
<a href="classpcl_1_1_kmeans-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">pcl::Kmeans类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><b>K-means</b> clustering.  
 <a href="classpcl_1_1_kmeans.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="kmeans_8h_source.html">kmeans.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:af0573e4ccc803e8f98afb3eed061c17a"><td class="memItemLeft" align="right" valign="top"><a id="af0573e4ccc803e8f98afb3eed061c17a"></a>
typedef unsigned int&#160;</td><td class="memItemRight" valign="bottom"><b>PointId</b></td></tr>
<tr class="separator:af0573e4ccc803e8f98afb3eed061c17a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aedf967a87d7186657f42f8b10b9ba7a3"><td class="memItemLeft" align="right" valign="top"><a id="aedf967a87d7186657f42f8b10b9ba7a3"></a>
typedef unsigned int&#160;</td><td class="memItemRight" valign="bottom"><b>ClusterId</b></td></tr>
<tr class="separator:aedf967a87d7186657f42f8b10b9ba7a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a069dfe0b6c1ff3b17d3df9321b77db75"><td class="memItemLeft" align="right" valign="top"><a id="a069dfe0b6c1ff3b17d3df9321b77db75"></a>
typedef std::set&lt; PointId &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>SetPoints</b></td></tr>
<tr class="separator:a069dfe0b6c1ff3b17d3df9321b77db75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adbf09807cefb0b729939cd13dbc31dfa"><td class="memItemLeft" align="right" valign="top"><a id="adbf09807cefb0b729939cd13dbc31dfa"></a>
typedef std::vector&lt; float &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>Point</b></td></tr>
<tr class="separator:adbf09807cefb0b729939cd13dbc31dfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4aff9275868eb01aa98291a7d2fca261"><td class="memItemLeft" align="right" valign="top"><a id="a4aff9275868eb01aa98291a7d2fca261"></a>
typedef std::vector&lt; SetPoints &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>ClustersToPoints</b></td></tr>
<tr class="separator:a4aff9275868eb01aa98291a7d2fca261"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaff2ab5a7eeaf6d580a10ce4df652451"><td class="memItemLeft" align="right" valign="top"><a id="aaff2ab5a7eeaf6d580a10ce4df652451"></a>
typedef std::vector&lt; ClusterId &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>PointsToClusters</b></td></tr>
<tr class="separator:aaff2ab5a7eeaf6d580a10ce4df652451"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a245e98b7173b12303dd42ae6765fa0ea"><td class="memItemLeft" align="right" valign="top"><a id="a245e98b7173b12303dd42ae6765fa0ea"></a>
typedef std::vector&lt; Point &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>Centroids</b></td></tr>
<tr class="separator:a245e98b7173b12303dd42ae6765fa0ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a8788bd4098ea370e018119fc516a5eb4"><td class="memItemLeft" align="right" valign="top"><a id="a8788bd4098ea370e018119fc516a5eb4"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_kmeans.html#a8788bd4098ea370e018119fc516a5eb4">Kmeans</a> (unsigned int num_points, unsigned int num_dimensions)</td></tr>
<tr class="memdesc:a8788bd4098ea370e018119fc516a5eb4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Empty constructor. <br /></td></tr>
<tr class="separator:a8788bd4098ea370e018119fc516a5eb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47501eb8e76a63d1d8c9b9af1ec349bf"><td class="memItemLeft" align="right" valign="top"><a id="a47501eb8e76a63d1d8c9b9af1ec349bf"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_kmeans.html#a47501eb8e76a63d1d8c9b9af1ec349bf">~Kmeans</a> ()</td></tr>
<tr class="memdesc:a47501eb8e76a63d1d8c9b9af1ec349bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">This destructor destroys <br /></td></tr>
<tr class="separator:a47501eb8e76a63d1d8c9b9af1ec349bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8823feefb720e8d9c70076cc8becdde0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_kmeans.html#a8823feefb720e8d9c70076cc8becdde0">setClusterSize</a> (unsigned int k)</td></tr>
<tr class="memdesc:a8823feefb720e8d9c70076cc8becdde0"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method sets the k-means cluster size.  <a href="classpcl_1_1_kmeans.html#a8823feefb720e8d9c70076cc8becdde0">更多...</a><br /></td></tr>
<tr class="separator:a8823feefb720e8d9c70076cc8becdde0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adfc25cfe3fc36da8fe6b8902858df42a"><td class="memItemLeft" align="right" valign="top"><a id="adfc25cfe3fc36da8fe6b8902858df42a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>kMeans</b> ()</td></tr>
<tr class="separator:adfc25cfe3fc36da8fe6b8902858df42a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fc47e82575a675f1e55b954f605a95c"><td class="memItemLeft" align="right" valign="top"><a id="a1fc47e82575a675f1e55b954f605a95c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setInputData</b> (std::vector&lt; Point &gt; &amp;data)</td></tr>
<tr class="separator:a1fc47e82575a675f1e55b954f605a95c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8334b39219f90335b549192cace35580"><td class="memItemLeft" align="right" valign="top"><a id="a8334b39219f90335b549192cace35580"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>addDataPoint</b> (Point &amp;data_point)</td></tr>
<tr class="separator:a8334b39219f90335b549192cace35580"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f70e12a373cf09366f8460c1e2d703e"><td class="memItemLeft" align="right" valign="top"><a id="a6f70e12a373cf09366f8460c1e2d703e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>initialClusterPoints</b> ()</td></tr>
<tr class="separator:a6f70e12a373cf09366f8460c1e2d703e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac72bb2821a8676694ec25bd81e0a447f"><td class="memItemLeft" align="right" valign="top"><a id="ac72bb2821a8676694ec25bd81e0a447f"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>computeCentroids</b> ()</td></tr>
<tr class="separator:ac72bb2821a8676694ec25bd81e0a447f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa3ba6c4e42276aecb01ce789cb69f14"><td class="memItemLeft" align="right" valign="top"><a id="aaa3ba6c4e42276aecb01ce789cb69f14"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><b>distance</b> (const Point &amp;x, const Point &amp;y)</td></tr>
<tr class="separator:aaa3ba6c4e42276aecb01ce789cb69f14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a56413edef42034c819854867495ea9"><td class="memItemLeft" align="right" valign="top"><a id="a2a56413edef42034c819854867495ea9"></a>
Centroids&#160;</td><td class="memItemRight" valign="bottom"><b>get_centroids</b> ()</td></tr>
<tr class="separator:a2a56413edef42034c819854867495ea9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected 属性</h2></td></tr>
<tr class="memitem:af27022ddb92b2e543389b43ae86a8436"><td class="memItemLeft" align="right" valign="top"><a id="af27022ddb92b2e543389b43ae86a8436"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><b>num_points_</b></td></tr>
<tr class="separator:af27022ddb92b2e543389b43ae86a8436"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23f8cff02c5ef8bae44cb47de08b5f6c"><td class="memItemLeft" align="right" valign="top"><a id="a23f8cff02c5ef8bae44cb47de08b5f6c"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><b>num_dimensions_</b></td></tr>
<tr class="separator:a23f8cff02c5ef8bae44cb47de08b5f6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a119b4a7a1ee839797406471ebbaaf212"><td class="memItemLeft" align="right" valign="top"><a id="a119b4a7a1ee839797406471ebbaaf212"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_kmeans.html#a119b4a7a1ee839797406471ebbaaf212">num_clusters_</a></td></tr>
<tr class="memdesc:a119b4a7a1ee839797406471ebbaaf212"><td class="mdescLeft">&#160;</td><td class="mdescRight">The number of clusters. <br /></td></tr>
<tr class="separator:a119b4a7a1ee839797406471ebbaaf212"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae34b2e388cea4dd1921fe111976e8123"><td class="memItemLeft" align="right" valign="top"><a id="ae34b2e388cea4dd1921fe111976e8123"></a>
std::vector&lt; Point &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_kmeans.html#ae34b2e388cea4dd1921fe111976e8123">data_</a></td></tr>
<tr class="memdesc:ae34b2e388cea4dd1921fe111976e8123"><td class="mdescLeft">&#160;</td><td class="mdescRight">The cluster centroids. <br /></td></tr>
<tr class="separator:ae34b2e388cea4dd1921fe111976e8123"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08a2eeae0fa28d26bc24d576993a00e7"><td class="memItemLeft" align="right" valign="top"><a id="a08a2eeae0fa28d26bc24d576993a00e7"></a>
ClustersToPoints&#160;</td><td class="memItemRight" valign="bottom"><b>clusters_to_points_</b></td></tr>
<tr class="separator:a08a2eeae0fa28d26bc24d576993a00e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97b5d9d8fa96a3cc597bfa91e56d3cc9"><td class="memItemLeft" align="right" valign="top"><a id="a97b5d9d8fa96a3cc597bfa91e56d3cc9"></a>
PointsToClusters&#160;</td><td class="memItemRight" valign="bottom"><b>points_to_clusters_</b></td></tr>
<tr class="separator:a97b5d9d8fa96a3cc597bfa91e56d3cc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2220fc2338109a7e02b04874e1beb9d"><td class="memItemLeft" align="right" valign="top"><a id="af2220fc2338109a7e02b04874e1beb9d"></a>
Centroids&#160;</td><td class="memItemRight" valign="bottom"><b>centroids_</b></td></tr>
<tr class="separator:af2220fc2338109a7e02b04874e1beb9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p><b>K-means</b> clustering. </p>
<dl class="section author"><dt>作者</dt><dd>Christian Potthast </dd></dl>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a8823feefb720e8d9c70076cc8becdde0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8823feefb720e8d9c70076cc8becdde0">&#9670;&nbsp;</a></span>setClusterSize()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void pcl::Kmeans::setClusterSize </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>k</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This method sets the k-means cluster size. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">k</td><td>number of clusters </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;{<a class="code" href="classpcl_1_1_kmeans.html#a119b4a7a1ee839797406471ebbaaf212">num_clusters_</a> = k;};</div>
<div class="ttc" id="aclasspcl_1_1_kmeans_html_a119b4a7a1ee839797406471ebbaaf212"><div class="ttname"><a href="classpcl_1_1_kmeans.html#a119b4a7a1ee839797406471ebbaaf212">pcl::Kmeans::num_clusters_</a></div><div class="ttdeci">unsigned int num_clusters_</div><div class="ttdoc">The number of clusters.</div><div class="ttdef"><b>Definition:</b> kmeans.h:185</div></div>
</div><!-- fragment -->
</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>ml/include/pcl/ml/<a class="el" href="kmeans_8h_source.html">kmeans.h</a></li>
<li>ml/include/pcl/ml/impl/<a class="el" href="kmeans_8hpp_source.html">kmeans.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>pcl</b></li><li class="navelem"><a class="el" href="classpcl_1_1_kmeans.html">Kmeans</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
